<template>
  <section class="page-style">
    <el-pagination
      background
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page.sync="pagination.pageIndex"
      :page-size.sync="pagination.pageSize"
      :page-sizes="[5, 10, 15, 20, 50, 100]"
      layout="total, sizes, prev, pager, next, jumper"
      :total="pagination.total"
    >
    </el-pagination>
  </section>
</template>

<script>
export default {
  props: ['pagination'],
  methods: {
    handleSizeChange(e) {
      this.$emit('handleSizeChange', e)
    },
    handleCurrentChange(e) {
      this.$emit('handleCurrentChange', e)
    }
  }
}
</script>
<style scoped lang="scss">
.page-style {
  margin-top: 15px;
  text-align: right;
}
</style>
